package org.hackystat.ui.projectviewer.gwt.client.validator;

/**
 * Validates the user input.
 *
 * @author Pavel Senin.
 *
 */
public class InputValidator {

  private static InputValidator instance;

  /**
   * Reports the singleton instance.
   *
   * @return The instance.
   */
  public static InputValidator getInstance() {
    if (null == instance) {
      instance = new InputValidator();
    }
    return instance;
  }

  /**
   * Validate the e-mail address provided.
   *
   * @param email The e-mail to validate.
   * @return True if valid, false otherwise.
   */
  public Boolean validateEmail(String email) {
    if (null != email && email.length() > 0) {
      return true;
    }
    return false;
  }

}
